﻿@namespace ThingsGateway.Gateway.Razor

@using ThingsGateway.Blazor.Diagrams.Components.Renderers
@using ThingsGateway.Extension.Generic
@using ThingsGateway.Gateway.Application
@using ThingsGateway.NewLife.Extension
<div class="custom-node @(Node.Selected ? " selected" : "")">
    <div class="card" style="width: 250px;">
        <div class="card-body">
            <h6 class="card-title mb-2">@Localizer[Node.Title]</h6>
            <div class="form-group">
                <Select class="form-control"
                        @bind-Value="@Node.Text"
                        IsVirtualize
                        OnQueryAsync="(a)=>OnRedundantDevicesQuery(a)"
                        ShowSearch="true"
                        PlaceHolder="@Localizer[Node.Placeholder]"
                @onpointerdown:stopPropagation
                @onpointerup:stopPropagation
                @onpointermove:stopPropagation />
            </div>
        </div>
    </div>

    @foreach (var port in Node.Ports)
    {
        <PortRenderer @key="port" Port="port"></PortRenderer>
    }
</div>


